﻿using System;
using System.Linq.Expressions;

namespace ExpressionProject
{
    public class Unit_1
    {
        public static void Go() 
        {
            //Expression.Add(Expression.Constant(1), Expression.Constant(66));
            //Expression.Lambda<Func<int>>(Expression.Add(Expression.Constant(1), Expression.Constant(66)));
            //Expression.Lambda<Func<int>>(Expression.Add(Expression.Constant(1), Expression.Constant(66))).Compile();
            //Expression.Lambda<Func<int>>(Expression.Add(Expression.Constant(1), Expression.Constant(66))).Compile()();
            Expression<Func<int, int>> expression = x => x * 10;
            int a = expression.Compile()(2);
            Console.WriteLine(a);
        }


    }
}
